package com.jett.JChatClient;



import com.jett.JChatMsg.BO.Message;
import com.jett.JChatMsg.BO.MessageType;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;


public class BootStrap {
    private static final  int JCHATSEVER_PORT=9999;
    private static final int MAX_READ_LEN=1024*1024;
    public static void main(String[] args) throws IOException {
//        创建Socket
        Socket socket = new Socket();
//        InetAddress addr  =InetAddress.getByName("127.0.0,1");
        InetSocketAddress inetSocketAddress = new InetSocketAddress(9999);
//        连接socket服务器
        socket.connect(inetSocketAddress);

        OutputStream outputStream = socket.getOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(outputStream);
        oos.writeObject(new Message(MessageType.TO_SERVER,"wxf"));
        oos.close();
        outputStream.close();
    }
}
